<template>
    <div>
        <p>{{state}}</p>

        <p>
            <button @click="changeTest">change test</button>
        </p>
    </div>
</template>

<script lang='ts'>
import {defineComponent, ref, reactive, toRefs, computed, toRef} from 'vue'
export default defineComponent({
  setup(){
      let state = reactive({
          total : 0,
      })
      
      let changeTest = () => {
          let total = toRef(state,"total");
          total.value ++ ;
      }
    return{
        state,
        changeTest
    
    }
  },
});
</script>

<style scoped >

</style>
